package com.arpa.oms.mapper;

import com.arpa.oms.domain.dto.PurchaseDto;
import com.arpa.oms.domain.entity.Purchase;
import com.arpa.oms.domain.vo.PurchaseVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * OMS采购单 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2020-10-22
 */
public interface PurchaseMapper extends BaseMapper<Purchase> {

    /**
     * 查询列表
     * @param dto
     * @return
     */
    List<PurchaseVo> queryList(PurchaseDto dto);

    /**
     * 查询合计,包含总数
     * @param dto
     * @return
     */
    PurchaseVo queryListSum(PurchaseDto dto);

    /**
     * 通过查询采购明细表获取实际采购数量
     * @param code 采购单号
     * @return
     */
    double getPurchaseActualQuantity(String code);

    double getPurchaseActualBaiscQuantity(String code);
}
